package hci;

import java.io.File;


/**
 * Contains any action the user can perform with the interface
 * 
 * <p>
 * <ul>
 * <li>Project: 	ChatSystemG3</li>
 * </ul>
 * </p>
 * 
 * @author COMBES Nicolas - LECHANTRE Arnaud
 */
public interface FromUser {
	
	/**
	 * connect
	 * @param username chosen for the connection
	 */
	public void connect(String username);
	
	/**
	 * disconnect (it closes all conversations and sockets)
	 */
	public void disconnect();
	
	/**
	 * Starts a conversation with selected user
	 * @param users that would be linked to the conversation
	 */
	public void startConversation(String[] users);
	
	/**
	 * Asks the controller to send the message to the users linked to the designated conversation
	 * @param convID unique identifier of the conversation
	 * @param message message to send
	 */
	public void sendMessage(int convID, String message);
	
	/**
	 * Requests the controller to propose remote user to download selected file
	 * @param convId identifier of the conversation
	 * @param file file to be sent
	 */
	public void sendFile(int convId, File file);
	
	/**
	 * Requests the controller to perform the response of the user to the file transfer request
	 * 
	 * @param convId identifier of the conversation
	 * @param accept true if the user want to download the file, false otherwise
	 * @param finename name of the file
	 * @param downloadLink directory to save file (null if file refused)
	 */
	public void answerFileRequest(int convId, boolean accept, String filename, File downloadLink);
	
	/**
	 * exitApplication
	 * 
	 * Action : ask the controller to close the application
	 */
	public void exitApplication();

	/**
	 * Requests the controller to switch the tongue of the conversation to the selected tongue
	 * @param tongue selected tongue

	 */
	public void changeTongue(String tongue);

	/**
	 * Requests the controller to continue the confirmed action
	 * @param action name of the action to confirm
	 */
	public void confirm(String action);
}
